import request from '@/utils/request'

// 查询来料入库列表
export function listLlrk(query) {
  return request({
    url: '/warehouse/llrk/list',
    method: 'get',
    params: query
  })
}

// 查询来料入库详细
export function getLlrk(llCode) {
  return request({
    url: '/warehouse/llrk/' + llCode,
    method: 'get'
  })
}

// 新增来料入库
export function addLlrk(data) {
  return request({
    url: '/warehouse/llrk',
    method: 'post',
    data: data
  })
}

// 修改来料入库
export function updateLlrk(data) {
  return request({
    url: '/warehouse/llrk',
    method: 'put',
    data: data
  })
}

// 删除来料入库
export function delLlrk(llCode) {
  return request({
    url: '/warehouse/llrk/' + llCode,
    method: 'delete'
  })
}

// 审核来料入库
export function examine(llCode) {
  return request({
    url: '/warehouse/llrk/examine/' + llCode,
    method: 'post'
  })
}

// 查询物料信息
export function wlList(query) {
  return request({
    url: '/warehouse/llrk/wlList',
    method: 'get',
    params: query
  })
}

// 查询仓库信息
export function ckList(query) {
  return request({
    url: '/warehouse/llrk/ckList',
    method: 'get',
    params: query
  })
}

// 撤销产品发货
export function cancel(llCode) {
  return request({
    url: '/warehouse/llrk/cancel/' + llCode,
    method: 'post'
  })
}
